/**
 * transform time method
 * @param {*} time 
 */
export function localTime(time){
  if(!time && typeof time !== 'number'){
    return ''
  }
  let currentTime = ''
  time = new Date(time).getTime()
  const offset = (new Date()).getTimezoneOffset()
  currentTime = (new Date(time - offset * 60000)).toISOString()
  currentTime = currentTime.substr(0, currentTime.lastIndexOf('.'))
  currentTime = currentTime.replace('T', ' ')
  return currentTime
}